angular
.module("app", [])
.controller("portfolioCtrl", ['$http', portfolioCtrlFunction]);


function portfolioCtrlFunction($http){
    var pfvm = this;

    pfvm.portfolio = {};
    // 
    pfvm.getPortfolio = function(){
        var ajax_param = {
            "action" : "portfolio"
        };
        $http.post(_base_url_+"controllers/default.php",ajax_param)
        .success(function(data, status, headers, config) {
            pfvm.portfolio = data["data"]["projects"];
            console.log(pfvm.portfolio);
        }).error(function(data, status) { 
            console.log("error");
        });  
    }

    pfvm.getPortfolio();
}